---
import GetCurrentPageSetting from "@/utils/GetCurrentPageSetting";
import cfg from "blog.config";
export interface Props {
  /** 标题覆盖 */
  title?: string;
}
const { props } = Astro;

const { header } = GetCurrentPageSetting(Astro.url),
  Pos = header!.title ? `${header!.title} - ` : "";
const {
  WebsiteSettings: { title, description, site },
} = cfg;
---

<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>{props.title ? props.title + title : title}</title>
<meta name="title" content={title} />
<meta
  name="description"
  content={`${props.title ? props.title + title : title} ${description}`}
/>

<meta property="og:type" content="website" />
<meta property="og:url" content={site} />
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
